package ru.uskov.trainer.datastore;

import java.util.List;

import ru.uskov.trainer.model.IProduct;
import ru.uskov.trainer.model.IProductDescription;
import ru.uskov.trainer.model.IProductGroup;
import ru.uskov.trainer.model.IProductItem;
import ru.uskov.trainer.model.UserAuthData;
import ru.uskov.trainer.model.WrongArgumentException;
import ru.uskov.trainer.model.impl.ProductDescription;

public interface IContext {

  IUser getUserData(UserAuthData userId);

  IProduct getSum(List<IProductItem> products);

  boolean userIdIsCorrect(Long id, String pwd);

  void removeProduct(IUser user, String itemId) throws WrongArgumentException;

  void removeAllProducts(UserAuthData userId) throws WrongArgumentException;

  void addProduct(IUser userId, String groupId, String productId, String quantity, String units) throws WrongArgumentException;

  UserAuthData generateNewUserId();

  List<IProductGroup> getGroups();

  List<IProductDescription> getProducts(String groupId);

  ProductDescription getProductDescriptionForId(Long rootProductId);

}
